//
//  KLSGCollectionCell.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/11/7.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGCollectionCell.h"

@implementation KLSGCollectionCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier]) {
        [self subView];
    }
    return self;
}

- (void)subView
{
    self.picture = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 70, 70)];
    [self addSubview:self.picture];
    
    self.title = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.picture.frame) + 8, CGRectGetMinY(self.picture.frame), kScreenWidth - CGRectGetMaxX(self.picture.frame) - 60, 25)];
    self.title.font = [UIFont systemFontOfSize:15];
    [self addSubview:self.title];
    
    self.detail = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.title.frame), CGRectGetMaxY(self.title.frame), kScreenWidth - CGRectGetMaxX(self.picture.frame) - 60, 25)];
    self.detail.textColor = [UIColor grayColor];
    self.detail.alpha = 0.8;
    self.detail.font = [UIFont systemFontOfSize:11];
    [self addSubview:self.detail];
    
    self.upTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.title.frame), CGRectGetMaxY(self.detail.frame), 100, 20)];
    self.upTimeLabel.alpha = 0.8;
    self.upTimeLabel.font = [UIFont systemFontOfSize:11];
    [self addSubview:self.upTimeLabel];
    
    UIView *line = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.title.frame), CGRectGetMaxY(self.picture.frame) + 5, kScreenWidth - CGRectGetMinX(self.title.frame), 1)];
    line.backgroundColor = [UIColor grayColor];
    line.alpha = 0.3;
    [self addSubview:line];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
